<template>
  <j-select-biz-component :width="1000" v-bind="configs" v-on="$listeners"/>
</template>

<script>
  import JSelectBizComponent from '../../../components/jeecgbiz/JSelectBizComponent'

  export default {
    name: 'JSelectLightPole',
    components: { JSelectBizComponent },
    props: ['value'],
    data() {
     return {
       settings: {
         name: '灯杆',
         displayKey: 'lightName',
         returnKeys: ['lightPoleId','id'],
         listUrl: '/corp/lightPole/list',
         queryParamCode: 'lightName',
         queryParamText: '灯杆名称',
         columns: [
           { title: '灯杆名称', dataIndex: 'lightName', align: 'center', width: '60%' },
           { title: '设备状态', dataIndex: 'status', align: 'center', width: '20%',customRender:(record)=>record == 0 ? '禁用' : record == 1 ? '启用' : '报警' },
           { title: '在线状态', dataIndex: 'olStatus', align: 'center', width: '20%', widthRight: '70%',customRender:(record)=>record == 0 ? '掉线' : '在线' },
         ]
       }
     }
    },
    computed: {
      configs() {
        console.log(typeof this.value)
        return Object.assign({ value: this.value}, this.settings, this.$attrs)
      }
    }
  }
</script>

<style lang="less" scoped></style>